package cn.itcast.eclipse;

import org.junit.Test;

public class EnumDemo {
	@Test
	public void test() {
		print(Grade.B);
	}
	
	public void print(Grade g) {
		String value = g.getValue();
		System.out.println(value);
	}
}

enum Grade{
	A("1"), B("2"), C("3"), D("4"), E("5");
	
	private String value;
	private Grade(String value) {
		this.value = value;
	}
	
	public String getValue() {
		return this.value;
	}
}






